<?php if ($gtAccount != NULL){ ?>
<h5><b>Group <?php echo $groupId;?></b></h5>
<!-- select from all employees and managers who belong to the group displayed as name(id) -->
<h1><b>Select Member to Delete:</b> </h1><br />
<?php echo $this->Form->create(null, array('action' => 'removeFromGroup'));?>
<input type="hidden" name="groupId" value="<?php echo $groupId;?>"/>
<select name ="deleteId">
<!-- managers -->
<?php foreach($groupManagers as $grpManager): ?>
	<option value="<?php echo $grpManager['manager_id']?>">
	<?php echo $grpManager['name'];
	echo " (";
	echo $grpManager['manager_id'];
	echo ")";
	?>
	</option>
<?php endforeach; ?>


<!-- employees -->
<?php foreach($groupMembers as $grpMember): ?>
	<option value="<?php echo $grpMember['employee_id']?>">
	<?php echo $grpMember['name'];
	echo " (";
	echo $grpMember['employee_id'];
	echo ")";
	?>
	</option>
<?php endforeach; ?>

</select>
<?php echo $this->Form->end("Delete");?>
<br/>
<h1><b>Select Manager to Add:</b> </h1><br />
<!-- select from all current managers displayed as name(id)-->
<?php echo $this->Form->create(null, array('action' => 'addManagerToGroup'));?>
<select name ="managerId">
<?php foreach($managers as $manager): ?>
	<option value="<?php echo $manager['Manager']['manager_id']?>">
	<?php echo $manager['Manager']['name'];
	echo " (";
	echo $manager['Manager']['manager_id'];
	echo ")";
	?>
	</option>
<?php endforeach; ?>
</select>
<input type="hidden" name="groupId" value="<?php echo $groupId;?>"/>
<?php echo $this->Form->end("Add Manager");?>
<!-- select from all current employees displayed as name(id)-->
<h1><b>Select Employee to Add:</b> </h1><br />
<?php echo $this->Form->create(null, array('action' => 'addEmployeeToGroup'));?>
<select name ="empId">
<?php foreach($emps as $emp): ?>
	<option value="<?php echo $emp['Employee']['employee_id']?>">
	<?php echo $emp['Employee']['name'];
	echo " (";
	echo $emp['Employee']['employee_id'];
	echo ")";
	?>
	</option>
<?php endforeach; ?>
</select>
<input type="hidden" name="groupId" value="<?php echo $groupId;?>"/>
<?php echo $this->Form->end("Add Employee");?>

<?php } else{ ?>
<h1> Invalid Login </h1>
<?php }?>

